<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@page import="java.text.SimpleDateFormat" %> 
    <%@page import="java.util.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<title>Insert title here</title>
<script type="text/javascript" >
    function NetAmount() { 
    
    //alert("Iam in java script"); 
    var pquantity= document.getElementById("prodquantity").value; 
    var prate = document.getElementById("prodrate").value; 
    var neta = parseInt(pquantity) * parseFloat(prate); document.getElementById("netamount").value = neta; 

}
</script>

<script type="text/javascript" >
    function checkDate() 
    { 
    
    	//alert("Hi....");
 	  	var datevalid2=/^(\d{1,2})$/;
    	
 	   var v1= document.getElementById("t1").value; 
 	   //var v2 = document.getElementById("t2").value; 
      
 	  
        if(v1.match(datevalid2))
        {
        	
        	var newdate=v1.concat(month);
        	
        	 alert(newdate);

        		document.getElementById("t3").value=newdate;
        }
    	
}
</script>

</head>
<body>

<%--<form name="f11">
    <input type="text" name="prodquantity" id="prodquantity" />
    <input type="text" name="prodrate" id="prodrate" />
    <input type="text" name="netamount" id="netamount" />
    <input type="button" id="calculate" onClick="NetAmount()" value="Calculate" />
    
    --%>
    
<%--<head>
<%--<title><c:import> Tag Example</c:import></title>
</head>
<body>
<c:import var="data" url="http://www.tutorialspoint.com"/>
<c:out value="${data}"/>
</body>
</html>
    
</form>
 --%>
 
<form name=addition>

<%
		SimpleDateFormat current = new SimpleDateFormat("dd/MM/yyyy");
	    String date1=current.format(new Date());

		String[] s1=date1.split("/");
		String day=s1[0];
		String month=s1[1];
		String year=s1[2];
		
		out.println(day);
		out.println(month);

		
  
%>
<input type="text" name="t1" id="t1">
<%-- <input type= "text" name="t2" id="t2" >--%> 
<input type="text" name="t3" id="t3"> 

<input type="button" name="check" value="Check" onClick="checkDate()">

</form>
</body>
</html>